<template>
  <div class="detail-tab-bar">
    <van-goods-action>
      <van-goods-action-icon icon="chat-o" text="客服" />
      <!-- <van-goods-action-icon icon="star" text="未收藏" color="#ff5000" @click="addToCollect()" /> -->
      <van-goods-action-button type="warning" text="加入购物车" @click="addTocart()" />
      <van-goods-action-button type="danger" text="立即购买" @click="tabpath" />
    </van-goods-action>
  </div>
</template>
<script>
export default {
  props: {
    _info: Number
  },
  date() {
    return {
      
    };
  },
  components: {},
  methods: {
    addTocart() {
      console.log("点击添加购物车");
      this.$emit("addcart");
    },
    //加入收藏
    addToCollect() {
      console.log("加入收藏");
      this.$emit("addcollect");
    },
    tabpath() {
      console.log("跳转购物车");
      this.$router.push("/cart");
    }
  }
};
</script>
<style lang='scss' scoped>
.detail-tab-bar {
  display: flex;
  background-color: #ccc;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
}
</style>